Fixed some errors for better import reliability.