Bugs fixed - now working