Fixed some resolving bugs