Removed the if/else checking for the discard options as it was causing PHP warnings