Small bugfix and cosmetic changes