Fix bug when reading/writing boolean properties

Change-Id: I3a309392cf7fb70e6669f6eab0cea391029e58f8
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>