Fixed a bug and other code
Updated a few lines