Update for API changes. I really can't be bothered to figure out this new complex flag system....

Signed-off-by: DziNeIT <dzineit@live.co.uk>