fix error in condition
fix package loading for nested package