Moved delete record button out of conditional block