Update lib.php

Ticket Fixed #13