Fixed more API bugs

Static variables can't be expressions