fixed more checking