Fixed #414 - Prevented NPE