Reformatted code, fix for getView = 0