Bug fixing and removing unnecessary try catch