Fixed checking bug