Fixed changes mentioned by Jchoude