fixed bugs in decimal and required