Fixed problem with code