onLoad callback + minimize fixes