Fixed bug where some enum values where passed represented as their definition in the function parameter.