Posts are not properly categorized

All posts, including Scheduled Posts and Published Posts are put into Draft Posts category
due to type comparison mismatch, because what `@model.get("active")` returns, is an integer.