Fixed the problem. It was due to argument order mismatch