Fixed problem with macro not closed