Fixed a crash when attempting to cast integers
Primitive types are now part of the core module