Fixed minor issues, now working as expected