fix bug in return statment