various bugs squashed