Bugfixes according to findbug