Issue number 24 & 5

Fixed the bugs of the upper mentioned issues