Fixed problem with return values