fix wrong plane size check