Fixes bug when custom view is empty