Bug fixes & small improvements