fixed wrong return value