Synced with support library v18, fixed issue #8 and issue #7