Fixed bug. Now working