fixing bugs with eval code