fix bug with return