Fixes bug in view