fixed nullpointer/casting issues
Merge branch 'master' of ssh://git@github.com/jonasws/Fellesprosjekt.git