Fix some annoying bugs that were causing possible duplicate class issues