Fixed crash when using command