fixed bug reported by Marty