Removed bugs of wrong type conversion

Removed many bugs because of type conversion from LuaValue to other
types..