Fixing functions return method