added workaround for issue with empty grid