Save var as int instead of boolean.

Turns out the system can't handle a boolean, cause it string converts to an empty string.

From #6161.