fix bug in shady.c