fix cap script for clockwork