bunch of issue fixes