fixed some bugs
Added missing platform dependency