some random and minor fixes