Fixed c-casts and usage of default types in pos class