Fix a few minor bugs in effects