some fixes & improvements