Fix some dumb bugs