Fixed some part of code