Fix for error when empty data and aesthetic are used. Fixes #587