Fixed using eval

I hope this is OK. If there is a better method let me know.