Fixed enum binding and added tests