diff --git a/app/controllers/resources/booking.php b/app/controllers/resources/booking.php
index 45ccb16fa7e25d5d9e801f4906a59bda7a79d39d..a4722eda5c94d24cd28737546d0ae532c316b4bf 100644
--- a/app/controllers/resources/booking.php
+++ b/app/controllers/resources/booking.php
@@ -1352,7 +1352,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 571ff63f0ed777d378498ac814b7ef9a5d64e87e..f982c377b5879d296c6381e2f78d3e467c4edbcb 100644
--- a/app/views/resources/booking/_add_edit_form.php
+++ b/app/views/resources/booking/_add_edit_form.php
@@ -537,7 +537,7 @@
                 <label>
                     <input type="checkbox" value="1"
                            name="overwrite_bookings"
-                        <?= $overwrite_bookings ? 'checked="checked"' : '' ?>>
+                        <?= !empty($overwrite_bookings) ? 'checked' : '' ?>>
                     <?= _('Vorhandene Buchungen überschreiben') ?>
                 </label>
             </fieldset>