more strict checks and reseting state