Fixed problems with buildscript

Signed-off-by: deathrat <deathrat43@gmail.com>