Fixed error in code

fixed / cleaned up