fixed php error & set stock types