fix for boundry check for some command