Fixed invalid returns for pedantic compiler option.