Applying patch given by IsuruH for PAAS-147