Fixing issue with return type