fixed problem with code