wrong variable used in status check