Fix some crashes due to data

Invalid data shouldn't cause the app to crash - will warn on console and
continue.