fixed three issues (see issue tracker for more info)