You might find the solution in this SO thread