Fix bug with separate sample planes