fixed major (but simple) bug