something wrong with the type calculation