hopefully fixed two bugs ...