Removed code causing PHP errors on live server