Fixed error which was happening due wrong data type declaration