Fixed import and path-checking.