update phpdoc, fix #130, fix #131

as discussed.