Fixing bug with actions being executed twice.