Bug fiexs and tweaks