several small fixes

@followthesheep if happy merge.