fixed bug in check command