Fixed wrong assumption over visibility of types.