Updated code for v1.3.1