Recognized mistake in my previous code and corrected it. - Will update pull request.