improvements and some buggy behaviour fixes