some nice patches with datatypes
correct mistakes