improve marker placement, fixes #3