Some pretty bugfixes