check for bad inputs and remove erroneous debug