couple of bugs to fix