Fixed bug and some syntax