Fixed function call
Fixed checking