bug fixed - is there a better way?