divide by zero fix and more view tweaking