misc bug fizes