!remove fix

!remove command fixed. and error checking