Fixed callback to javascript