fix some imports, and an uneccesary cast.