check boundaries and fix NPEs

Signed-off-by: Florian Thienel <florian@thienel.org>
5 files changed