bugfixes for issues from Atmel errata