(4)When any owner, or master or agent is convicted of an offence under sub-section (3), the convicting Magistrate may inquire into and determine the amount payable on account of expenses by such owner, master or agent under that sub-section and may direct that the same shall be recovered from him in the manner provided for the recovery of fines.