Move marker validity check. Fixes #15