checking for bad frames