Fixed incorrect return value to eliminate compiler warnings