fixed some lingering bugs