fixing resolving classes from within other classes