bug fixes and extra api methods