diff --git a/app/controllers/resources/booking.php b/app/controllers/resources/booking.php
index 145a885a2a5ba5b4e6470ce17d8be594ae73f62d..b2ddf011d99a429e5702d8248d6449c80893feea 100644
--- a/app/controllers/resources/booking.php
+++ b/app/controllers/resources/booking.php
@@ -1346,7 +1346,7 @@ class Resources_BookingController extends AuthenticatedController
                     $resource,
                     $time_intervals,
                     [1, 3],
-                    ($this->booking->id ? [$this->booking->id] : [])
+                    isset($this->booking->id) ? [$this->booking->id] : []
                 );
                 $reservations_to_overwrite = array_merge(
                     $reservations_to_overwrite,
diff --git a/app/views/admin/lockrules/_form.php b/app/views/admin/lockrules/_form.php
index c4ef11143bd7f87d4fb339d6449964e4d5dd1392..b96c7b6032ad0ba0dac4e85c3ce5c0b769a6c344 100644
--- a/app/views/admin/lockrules/_form.php
+++ b/app/views/admin/lockrules/_form.php
@@ -85,12 +85,14 @@ use Studip\Button;
                         </td>
                         <td>
                             <input type="radio"
-                                   name="lockdata_attributes[<?= $attr ?>]" <?= ($lock_rule['attributes'][$attr] ? 'checked' : '') ?>
-                                   value="1"/>
+                                   name="lockdata_attributes[<?= $attr ?>]"
+                                   <?= !empty($lock_rule['attributes'][$attr]) ? 'checked' : '' ?>
+                                   value="1">
                         </td>
                         <td>
                             <input type="radio"
-                                   name="lockdata_attributes[<?= $attr ?>]" <?= (!$lock_rule['attributes'][$attr] ? 'checked' : '') ?>
+                                   name="lockdata_attributes[<?= $attr ?>]"
+                                   <?= empty($lock_rule['attributes'][$attr]) ? 'checked' : '' ?>
                                    value="0"/>
                         </td>
                     </tr>
diff --git a/app/views/resources/booking/_add_edit_form.php b/app/views/resources/booking/_add_edit_form.php
index c35f405db1c0dd57f62e5a7603caa6ebb53d5fba..3b4e38066615d907cc3e1f54fe0d579ed77310f3 100644
--- a/app/views/resources/booking/_add_edit_form.php
+++ b/app/views/resources/booking/_add_edit_form.php
@@ -541,7 +541,7 @@
                 <label>
                     <input type="checkbox" value="1"
                            name="overwrite_bookings"
-                        <?= $overwrite_bookings ? 'checked="checked"' : '' ?>>
+                        <?= !empty($overwrite_bookings) ? 'checked' : '' ?>>
                     <?= _('Vorhandene Buchungen überschreiben') ?>
                 </label>
             </fieldset>