Tweaked and fixed... now it works