fixed block scoping issue

WOOPS SILLY JS