fix for broken code