Fixing UndefinedConversionError