Bug fixes & improvements