Merge pull request #152 from maniac103/for-upstream

Follow-up fixes
Allow opening, closing and merging pull requests.