fixed bug (properly this time!)