bug reported by @Midnighter